.class public Lcom/estrongs/fs/impl/usb/fs/ntfs/t;
.super Ljava/lang/Object;
.source "NTFSVolume.java"


# instance fields
.field private final a:Les/a50;

.field private b:I

.field private final c:Lcom/estrongs/fs/impl/usb/fs/ntfs/a;

.field private d:Lcom/estrongs/fs/impl/usb/fs/ntfs/m;

.field private e:Lcom/estrongs/fs/impl/usb/fs/ntfs/l;


# direct methods
.method static constructor <clinit>()V
    .locals 0

    return-void
.end method

.method public constructor <init>(Ljava/lang/String;Les/a50;Ljava/nio/ByteBuffer;)V
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/estrongs/fs/impl/usb/UsbFsException;
        }
    .end annotation

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    if-nez p3, :cond_0

    const/16 p1, 0x200

    .line 2
    invoke-static {p1}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;

    move-result-object p3

    const-wide/16 v0, 0x0

    .line 3
    invoke-interface {p2, v0, v1, p3}, Les/a50;->a(JLjava/nio/ByteBuffer;)V

    .line 4
    :cond_0
    invoke-virtual {p3}, Ljava/nio/ByteBuffer;->array()[B

    move-result-object p1

    invoke-static {p1}, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->a([B)Z

    move-result p1

    if-eqz p1, :cond_2

    .line 5
    iput-object p2, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->a:Les/a50;

    .line 6
    new-instance p1, Lcom/estrongs/fs/impl/usb/fs/ntfs/a;

    invoke-virtual {p3}, Ljava/nio/ByteBuffer;->array()[B

    move-result-object p2

    invoke-direct {p1, p2}, Lcom/estrongs/fs/impl/usb/fs/ntfs/a;-><init>([B)V

    iput-object p1, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->c:Lcom/estrongs/fs/impl/usb/fs/ntfs/a;

    .line 7
    invoke-virtual {p1}, Lcom/estrongs/fs/impl/usb/fs/ntfs/a;->d()I

    move-result p1

    iput p1, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->b:I

    if-gtz p1, :cond_1

    const/16 p1, 0x1000

    .line 8
    iput p1, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->b:I

    :cond_1
    return-void

    .line 9
    :cond_2
    new-instance p1, Lcom/estrongs/fs/impl/usb/UsbFsException;

    sget-object p2, Lcom/estrongs/fs/impl/usb/UsbFsException$ERROR_CODE;->USB_ERROR_TYPE_NOT_SUPPORTED:Lcom/estrongs/fs/impl/usb/UsbFsException$ERROR_CODE;

    const-string p3, "unsupported partition type"

    invoke-direct {p1, p3, p2}, Lcom/estrongs/fs/impl/usb/UsbFsException;-><init>(Ljava/lang/String;Lcom/estrongs/fs/impl/usb/UsbFsException$ERROR_CODE;)V

    throw p1
.end method

.method public static a([B)Z
    .locals 3

    .line 1
    new-instance v0, Ljava/lang/String;

    const/4 v1, 0x3

    const/16 v2, 0x8

    invoke-direct {v0, p0, v1, v2}, Ljava/lang/String;-><init>([BII)V

    const-string p0, "NTFS    "

    invoke-virtual {v0, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p0

    return p0
.end method


# virtual methods
.method public final a()Lcom/estrongs/fs/impl/usb/fs/ntfs/a;
    .locals 1

    .line 2
    iget-object v0, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->c:Lcom/estrongs/fs/impl/usb/fs/ntfs/a;

    return-object v0
.end method

.method public a(J[BII)V
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 3
    invoke-virtual {p0}, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->b()I

    move-result v0

    int-to-long v1, v0

    mul-long p1, p1, v1

    .line 4
    iget-object v1, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->a:Les/a50;

    mul-int p5, p5, v0

    invoke-static {p3, p4, p5}, Ljava/nio/ByteBuffer;->wrap([BII)Ljava/nio/ByteBuffer;

    move-result-object p3

    invoke-interface {v1, p1, p2, p3}, Les/a50;->a(JLjava/nio/ByteBuffer;)V

    return-void
.end method

.method public b()I
    .locals 1

    .line 1
    iget v0, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->b:I

    if-nez v0, :cond_0

    const/16 v0, 0x1000

    .line 2
    iput v0, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->b:I

    .line 3
    :cond_0
    iget v0, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->b:I

    return v0
.end method

.method public c()Lcom/estrongs/fs/impl/usb/fs/ntfs/m;
    .locals 9
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    iget-object v0, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->d:Lcom/estrongs/fs/impl/usb/fs/ntfs/m;

    if-nez v0, :cond_1

    .line 2
    invoke-virtual {p0}, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->a()Lcom/estrongs/fs/impl/usb/fs/ntfs/a;

    move-result-object v0

    .line 3
    invoke-virtual {v0}, Lcom/estrongs/fs/impl/usb/fs/ntfs/a;->e()I

    move-result v1

    .line 4
    invoke-virtual {p0}, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->b()I

    move-result v2

    if-ge v1, v2, :cond_0

    const/4 v1, 0x1

    const/4 v8, 0x1

    goto :goto_0

    .line 5
    :cond_0
    div-int/2addr v1, v2

    move v8, v1

    :goto_0
    mul-int v2, v2, v8

    .line 6
    new-array v1, v2, [B

    .line 7
    invoke-virtual {v0}, Lcom/estrongs/fs/impl/usb/fs/ntfs/a;->f()J

    move-result-wide v4

    const/4 v7, 0x0

    move-object v3, p0

    move-object v6, v1

    invoke-virtual/range {v3 .. v8}, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->a(J[BII)V

    .line 8
    new-instance v0, Lcom/estrongs/fs/impl/usb/fs/ntfs/m;

    const/4 v2, 0x0

    invoke-direct {v0, p0, v1, v2}, Lcom/estrongs/fs/impl/usb/fs/ntfs/m;-><init>(Lcom/estrongs/fs/impl/usb/fs/ntfs/t;[BI)V

    iput-object v0, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->d:Lcom/estrongs/fs/impl/usb/fs/ntfs/m;

    .line 9
    invoke-virtual {v0}, Lcom/estrongs/fs/impl/usb/fs/ntfs/l;->g()V

    .line 10
    :cond_1
    iget-object v0, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->d:Lcom/estrongs/fs/impl/usb/fs/ntfs/m;

    return-object v0
.end method

.method public d()Lcom/estrongs/fs/impl/usb/fs/ntfs/l;
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    iget-object v0, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->e:Lcom/estrongs/fs/impl/usb/fs/ntfs/l;

    if-nez v0, :cond_0

    .line 2
    invoke-virtual {p0}, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->c()Lcom/estrongs/fs/impl/usb/fs/ntfs/m;

    move-result-object v0

    const-wide/16 v1, 0x5

    .line 3
    invoke-virtual {v0, v1, v2}, Lcom/estrongs/fs/impl/usb/fs/ntfs/m;->a(J)Lcom/estrongs/fs/impl/usb/fs/ntfs/l;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->e:Lcom/estrongs/fs/impl/usb/fs/ntfs/l;

    .line 4
    :cond_0
    iget-object v0, p0, Lcom/estrongs/fs/impl/usb/fs/ntfs/t;->e:Lcom/estrongs/fs/impl/usb/fs/ntfs/l;

    return-object v0
.end method
